
function post_user(form, s) {
	// $.blockUI({ message: $('#loading') });

	if (typeof form == 'undefined') {
		var form = document.forms[0];
	}

	var url = _url(form.action);
	if (s == null) {
		var body = _body(form);
	} else {
		var body = _body(form) + s;
	}

	$.post(url, body, function(data) {
		if (data == '1') {
			$('#dialog_login').dialog('open');
		} else {
			$('#placeholder').html(data);
		}
	});

	return false;
}

function password22(form) {
	if (form == null || form == undefined) {
		form = $("#form_password")[0];
	}
	
	var body = { };
	body.password = form.password.value;
	body.newpassword = form.newpassword.value;
	body.renewpassword = form.renewpassword.value;
	if (body.password == null || body.password == '') {
		alert("旧密码不能为空，请重新输入！");
		return false;			
	}
	
	if (body.newpassword == null || body.newpassword == '') {
		alert("新密码不能为空，请重新输入！");
		return false;			
	}
	
	if (body.newpassword != body.renewpassword) {
		alert("新密码输入有误，请重新输入！");
		return false;			
	}
	
	if (!confirm("确认是否提交？")) {
		return false;
	}

	$(this).dialog("close");

	$.post('my.php?do=My.passwordPost', body, function(data) {
		var a = $.evalJSON(data);
		
		if (a.status == 1) {
			alert("密码修改成功！");
		}
		
		if (a.status == 2) {
			alert("旧密码不对，修改失败！");
		}				
	});
}
